#ifndef IMAGEHANDLER_H_INC
#define IMAGEHANDLER_H_INC

#include <opencv2/opencv.hpp>
#include <vector>
#include "aruco.h"

/**
 * Senior project: Augmented reality
 * imagehandler.h
 * 
 * Note that the imagehandler takes in and spits out RGB images. (when it spits
 * out color images, that is.)
 */

class ImageHandler {
public:
    ImageHandler();
    virtual ~ImageHandler();
    
    // public methods
    cv::Mat getNextFrame();
    cv::Mat getNextFrameAndMatches(vector<aruco::Marker> *theDetectedMarkers);
   vector<aruco::Marker> findTemplateMatches(Mat inFrame);
    void detectMotion(Mat previousFrame, Mat nextFrame, vector<Point2f> *previousPoints, vector<Point2f> &nextPoints);
    cv::Mat findDiff(Mat background, Mat image, int thresholdValue=25);
    
private:
    cv::VideoCapture *theCapture;
    aruco::ArMarkerDetector theDetector;
};

#endif
